﻿using System;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;

namespace SelfService.Model.Models
{
    public class SysDevice : BasePoco
    {
        [Display(Name = "名称")]
        [StringLength(64)]
        [Required]
        public string Name { get; set; }

        [Display(Name = "型号")]
        [StringLength(64)]
        [Required]
        public string Model { get; set; }

        [Display(Name = "描述")]
        [StringLength(256)]
        public string Description { get; set; }

        [Display(Name = "通讯方式")]
        [Required]
        public SysDeviceModeEnum Mode { get; set; }

        [Display(Name = "硬件类型")]
        public SysDeviceGroup Group { get; set; }

        [Display(Name = "硬件类型")]
        [Required]
        public Guid GroupId { get; set; }

        [Display(Name = "端口")]
        public int Port { get; set; }

        [Display(Name = "Dll文件名称")]
        [StringLength(64)]
        public string DllName { get; set; }

        [Display(Name = "Dll文件")]
        public FileAttachment DllZip { get; set; }

        [Display(Name = "Dll文件")]
        public Guid? DllZipId { get; set; }

        [Display(Name = "DLL类名称")]
        [StringLength(64)]
        public string DllClass { get; set; }

        [Display(Name = "DLL文件MD5")]
        [StringLength(64)]
        public string DllHash { get; set; }

        [Display(Name = "DLL命名空间")]
        [StringLength(64)]
        public string DllWorkSpace { get; set; }

        [Display(Name = "是否启用")]
        public CommonYesOrNo IsEnable { get; set; }

        [Display(Name = "是否吞卡式读卡器")]
        public bool IsSwallow { get; set; }
    }
}
